package com.yanqu.road.logic.bussiness.activity;

import com.yanqu.road.entity.activity.chinesechess.*;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.Map;

public class ChineseChessBusiness {

    public static boolean updateGameOverReward(Map<Long,ChineseChessUserData> chessUserDataMap) {
        return DaoHelper.getChineseChessUserDataDaoImpl().updateGameOverReward(chessUserDataMap);
    }

    public static Map<Long,ChineseChessUserData> getSendRewardData(int activityId) {
        return DaoHelper.getChineseChessUserDataDaoImpl().getSendRewardData(activityId);
    }

    public static ChineseChessUserData getUserData(long userId, int activityId) {
        return DaoHelper.getChineseChessUserDataDaoImpl().getUserData(activityId, userId);
    }


    public static boolean addUserData(ChineseChessUserData userData) {
        return DaoHelper.getChineseChessUserDataDaoImpl().add(userData);
    }

    public static boolean updateUserData(ChineseChessUserData userData) {
        return DaoHelper.getChineseChessUserDataDaoImpl().update(userData);
    }

    public static ChineseChessPracticeUserData getPracticeUserData(long userId, int activityId) {
        return DaoHelper.getChineseChessPracticeUserDataDaoImpl().getUserData(activityId, userId);
    }


    public static boolean addPracticeUserData(ChineseChessPracticeUserData userData) {
        return DaoHelper.getChineseChessPracticeUserDataDaoImpl().add(userData);
    }

    public static boolean updatePracticeUserData(ChineseChessPracticeUserData userData) {
        return DaoHelper.getChineseChessPracticeUserDataDaoImpl().update(userData);
    }

    public static Map<Integer, ChineseChessConfig> getChessMap(int activityId) {
        return DaoHelper.getChineseChessConfigDaoImpl().getChessMap(activityId);
    }
    public static Map<Integer, ChineseChessCreateConfig> getChessCreateMap(int activityId) {
        return DaoHelper.getChineseChessConfigDaoImpl().getChessCreateMap(activityId);
    }
    public static Map<Integer, ChineseChessWeightConfig> getChessWeightMap(int activityId) {
        return DaoHelper.getChineseChessConfigDaoImpl().getChessWeightMap(activityId);
    }
    public static Map<Integer, ChineseChessMoveConfig> getChessMoveMap(int activityId) {
        return DaoHelper.getChineseChessConfigDaoImpl().getChessMoveMap(activityId);
    }

}
